Simulation 1

Data structure: \(O = (W, A, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-5 + W + 2.25A -0.5WA)]\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W                  A                Y         
##  Min.   :-4.06831   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:-0.68787   1st Qu.:0.6036   1st Qu.:0.0000  
##  Median :-0.01389   Median :2.0045   Median :0.0000  
##  Mean   :-0.01743   Mean   :2.1175   Mean   :0.4659  
##  3rd Qu.: 0.65307   3rd Qu.:3.4112   3rd Qu.:1.0000  
##  Max.   : 3.44474   Max.   :5.0000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.451   2.838   2.733   4.115   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.8608  2.1748  2.2577  3.5134  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.388   1.762   1.935   3.171   5.000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.263   1.554   2.678   5.000

Simulation 2

Data structure: \(O = (W, A, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 + 2W + 5sin(A^{1.5}) + 2WA)]\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W                   A               Y         
##  Min.   :-3.967532   Min.   :0.000   Min.   :0.0000  
##  1st Qu.:-0.669179   1st Qu.:0.616   1st Qu.:0.0000  
##  Median :-0.006594   Median :1.989   Median :0.0000  
##  Mean   :-0.002222   Mean   :2.121   Mean   :0.0693  
##  3rd Qu.: 0.662488   3rd Qu.:3.407   3rd Qu.:0.0000  
##  Max.   : 3.604661   Max.   :5.000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.314   2.821   2.713   4.229   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.9032  2.2378  2.2838  3.5098  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.4145  1.7833  1.9454  3.1190  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.237   1.561   2.598   5.000

n = 200

##  The average lambda of CV-HAL: 0.0038 (= 1 * lambda_CV )
##  The average lambda of globally undersmoothed HAL: 0.0016 (= 0.3269 * lambda_CV )
##  The average lambdatime of locally undersmoothed HAL:       0.0038, 0.0037, 0.0036, 0.0036, 0.0036, 0.0036, 0.0036, 0.0036, 0.0036, 0.0036, 0.0036   (= [1, 0.9941, 0.9871, 0.9856, 0.9861, 0.9873, 0.9887, 0.9886, 0.9898, 0.9859, 0.9855] * lambda_CV
##  The average fitting time for CV-HAL: 4.8046 seconds
##  The average fitting time for globally undersmoothed HAL: 6.4723 seconds
##  The average fitting time for locally undersmoothed HAL: 19.5222 seconds

Simulation 3

Data structure: \(O = (W, A, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 - 3W + 4A + \mathbf{I}(A>2) * 5sin((0.8A)^2 - 2.6) )]\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W                   A                Y         
##  Min.   :-3.704380   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:-0.695365   1st Qu.:0.5928   1st Qu.:0.0000  
##  Median : 0.006192   Median :2.0151   Median :0.0000  
##  Mean   :-0.006329   Mean   :2.1158   Mean   :0.4356  
##  3rd Qu.: 0.670896   3rd Qu.:3.4183   3rd Qu.:1.0000  
##  Max.   : 3.747677   Max.   :5.0000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.443   2.795   2.745   4.212   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.8589  2.2516  2.2923  3.5876  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.4411  1.7839  1.9224  3.0980  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.187   1.521   2.534   5.000

n = 200

##  The average lambda of CV-HAL: 0.0027 (= 1 * lambda_CV )
##  The average lambda of globally undersmoothed HAL: 0.0009 (= 0.2582 * lambda_CV )
##  The average lambdatime of locally undersmoothed HAL:       0.0024, 0.0024, 0.0025, 0.0025, 0.0025, 0.0025, 0.0025, 0.0025, 0.0026, 0.0026, 0.0026   (= [0.9023, 0.9042, 0.907, 0.9177, 0.9291, 0.9689, 0.9495, 0.9278, 0.9715, 0.9817, 0.9888] * lambda_CV
##  The average fitting time for CV-HAL: 3.8236 seconds
##  The average fitting time for globally undersmoothed HAL: 6.1613 seconds
##  The average fitting time for locally undersmoothed HAL: 24.2020 seconds

Simulation 4

Data structure: \(O = (W_1, W_2, W_3, W_4, W_5, A, Y)\)

  • W - baseline covariates
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
  • Structural equations F and endogenous variables:
    • \(W \sim N(\mu_W, \Sigma_W)\)
    • \(A = bound(0.1W_1 + 0.2W_2 + 0.5W_3 + 0.15W_4 - 0.05W_5 - 0.01W_3W_5 + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-7 -W_1 + 2W_2 - 0.5W_4 - W_1W_3 + 4A + 0.5AW_2)]\)
      • where \(\mu_W = \begin{bmatrix}0 \\0 \\5 \\1 \\1 \\\end{bmatrix}\), and \(\Sigma_W = \begin{bmatrix}1&0.8&1.35&0.1&0.03 \\0.8&1&1.2&0.15&0.03 \\1.35&1.2&2.25&0.075&0.225 \\0.1&0.15&0.075&0.25&0.1125 \\0.03&0.03&0.225&0.1125&0.09 \\\end{bmatrix}\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W1                  W2                  W3                W4         
##  Min.   :-3.949712   Min.   :-3.883479   Min.   :-0.7524   Min.   :-0.6893  
##  1st Qu.:-0.699081   1st Qu.:-0.669250   1st Qu.: 3.9894   1st Qu.: 0.6641  
##  Median : 0.002833   Median :-0.004770   Median : 5.0041   Median : 1.0093  
##  Mean   :-0.007003   Mean   :-0.009169   Mean   : 5.0012   Mean   : 1.0016  
##  3rd Qu.: 0.677971   3rd Qu.: 0.655839   3rd Qu.: 6.0203   3rd Qu.: 1.3463  
##  Max.   : 4.557520   Max.   : 4.104698   Max.   :10.3658   Max.   : 3.2498  
##        W5                A               Y         
##  Min.   :-0.2287   Min.   :0.000   Min.   :0.0000  
##  1st Qu.: 0.7784   1st Qu.:1.618   1st Qu.:0.0000  
##  Median : 1.0040   Median :2.551   Median :1.0000  
##  Mean   : 1.0066   Mean   :2.550   Mean   :0.6185  
##  3rd Qu.: 1.2375   3rd Qu.:3.492   3rd Qu.:1.0000  
##  Max.   : 2.3023   Max.   :5.000   Max.   :1.0000

Simulation 5

Data structure: \(O = (W_1, W_2, W_3, W_4, W_5, A, Y)\)

  • W - baseline covariates
  • A - treatment level based on W, continuous between 0 and 5
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
  • Structural equations F and endogenous variables:
    • \(W \sim N(\mu_W, \Sigma_W)\)
    • \(A = bound(0.1W_1 + 0.2W_2 + 0.5W_3 + 0.15W_4 - 0.05W_5 - 0.01W_3W_5 + U_A, min=0, max=5)\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 -W_1 + 2W_2 - 0.5W_4 - 0.5W_1W_3 + 4A + \mathbf{I}(A>2) *5sin((0.8A)^2 - 2.6))]\)
      • where \(\mu_W = \begin{bmatrix}0 \\0 \\5 \\1 \\1 \\\end{bmatrix}\), and \(\Sigma_W = \begin{bmatrix}1&0.8&1.35&0.1&0.03 \\0.8&1&1.2&0.15&0.03 \\1.35&1.2&2.25&0.075&0.225 \\0.1&0.15&0.075&0.25&0.1125 \\0.03&0.03&0.225&0.1125&0.09 \\\end{bmatrix}\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in [0,5]\), the causal dose-response curve

##        W1                 W2                  W3               W4         
##  Min.   :-4.10305   Min.   :-3.992762   Min.   :-0.723   Min.   :-1.0645  
##  1st Qu.:-0.66856   1st Qu.:-0.665766   1st Qu.: 3.993   1st Qu.: 0.6574  
##  Median : 0.01409   Median : 0.004221   Median : 5.007   Median : 0.9974  
##  Mean   : 0.01345   Mean   : 0.004542   Mean   : 5.008   Mean   : 0.9924  
##  3rd Qu.: 0.68434   3rd Qu.: 0.676313   3rd Qu.: 6.014   3rd Qu.: 1.3343  
##  Max.   : 3.37515   Max.   : 4.074948   Max.   :10.222   Max.   : 2.8006  
##        W5                A               Y        
##  Min.   :-0.1632   Min.   :0.000   Min.   :0.000  
##  1st Qu.: 0.7565   1st Qu.:1.604   1st Qu.:0.000  
##  Median : 0.9909   Median :2.561   Median :0.000  
##  Mean   : 0.9929   Mean   :2.554   Mean   :0.476  
##  3rd Qu.: 1.2283   3rd Qu.:3.509   3rd Qu.:1.000  
##  Max.   : 2.2176   Max.   :5.000   Max.   :1.000

Simulation 6

Data structure: \(O = (W_1, W_2, W_3, A, Y)\)

  • W - baseline covariates
  • A - treatment level based on W, continuous between 0 and 1
  • Y - outcome, indicator of an event

Underlying data generating process, \(P_{U,X}\)

  • Structural equations F and endogenous variables:
    • \(W_1 \sim Uniform(o,1)\)
    • \(W_2 \sim Bernoulli(\mu=0, \sigma^2 = 2^2)\)
    • \(W_3 \sim N(W_1, 0.25*exp(2W_1))\)
    • \(A \sim Beta(v(W)\mu(W), v(W)[1-\mu(W)])\)
    • \(Y \sim Bernoulli(Q_0(A,W))\)
      • where:
      • \(v(W) = exp(1 + 2W_1expit(W3))\)
      • \(\mu(W) = expit(0.03 - 0.8log(1+W_2) + 0.9exp(W_1)W_2 - 0.4arctan(W_3+2)W_2W_1)\)
      • \(\bar{Q}_0(A,W) = expit(-2 + 1.5A + 5A^3 - 2.5W_1 + 0.5AW_2 - log(A)W_1W_2 + 0.5A^{3/4}W_1W_3)\)

Outcome of interest: \(E_0[Y|a,W]\), \(a \in (0,1])\), the causal dose-response curve

##        W1                  W2               W3                 A           
##  Min.   :0.0000212   Min.   :0.0000   Min.   :-3.20646   Min.   :0.008172  
##  1st Qu.:0.2550912   1st Qu.:0.0000   1st Qu.: 0.07964   1st Qu.:0.483313  
##  Median :0.5016742   Median :1.0000   Median : 0.80953   Median :0.661615  
##  Mean   :0.5026247   Mean   :0.6984   Mean   : 0.80890   Mean   :0.632873  
##  3rd Qu.:0.7530768   3rd Qu.:1.0000   3rd Qu.: 1.53093   3rd Qu.:0.807451  
##  Max.   :0.9999523   Max.   :1.0000   Max.   : 5.10017   Max.   :0.999333  
##        Y        
##  Min.   :0.000  
##  1st Qu.:0.000  
##  Median :0.000  
##  Mean   :0.483  
##  3rd Qu.:1.000  
##  Max.   :1.000